import org.junit.Test;
import org.learn.spring5.bean.Classes;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestSpring5 {
    /**
     * IOC操作Bean管理-注入集合属性
     */
    @Test
    public void test() {

        ApplicationContext context = new ClassPathXmlApplicationContext("bean1.xml");
        Classes classes = context.getBean("classes", Classes.class);
        classes.test();
    }

    /**
     * IOC操作Bean管理-抽取公共的集合属性
     */
    @Test
    public void test2() {

        ApplicationContext context = new ClassPathXmlApplicationContext("bean2.xml");
        Classes classes = context.getBean("classes", Classes.class);
        classes.test();
    }



}
